#ifndef LANGUAGEFRAME_H
#define LANGUAGEFRAME_H

//添加语言功能未完善，所以暂时只考虑中英文的情况切换。

#include <QFrame>
#include <QLabel>
#include <QIcon>
#include <QGSettings>
#include <QToolButton>
#include "widgets/Frame/hlineframe.h"
#define THEME_QT_SCHEMA  "org.ukui.style"
#define LANGUAGE_FRAME_OBJECT_NAME "LanguageFrame"

class LanguageFrame : public QFrame
{
    Q_OBJECT
public:
    LanguageFrame(QString showName, QWidget *parent = nullptr);
    ~LanguageFrame();
    void showSelectedIcon(bool flag);
    bool isSelection();
    QToolButton *createToolBtn();
    void setHLine(HLineFrame *hline);
    QString getShowName();

private:
    void mousePressEvent(QMouseEvent *e);

private:
    QLabel *nameLabel         = nullptr;
    QLabel *selectedIconLabel = nullptr;
    HLineFrame *hline         = nullptr;

Q_SIGNALS:
    void clicked();
    void deleted();
};


#endif // LANGUAGEFRAME_H
